- /* sloslor.cpp by K.Tsuru */
- // function ID = 232 DRADIX
- /********************************************************
- SLong class
- bit or operator m|n
- It does not consider the sign and return a positive value.
- [Argorithm]
- 1.radix converion to SInteger with radix BRADIX
- 2.take bit or for each figure
- 3.reverse conversion
- *********************************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
- SLong operator|(const SLong& m, const SLong& n){
- if(m.Sign(232) == 0) return n;
- if(n.Sign(232) == 0) return m;
-
- SInteger M, N;
- //convert to binary
- M = M.ConvToBin(m); N = N.ConvToBin(n);
- M = M | N;
- return M.ConvToDec(); //convert to decimal
- }
sloslor.cpp : last modifiled at 2015/11/27 14:27:07(690 bytes)
created at 2017/10/07 10:26:50
The creation time of this html file is 2017/11/09 14:52:03 (Thu Nov 09 14:52:03 2017).